package com.mediacloud.app.newsmodule.fragment.activity

import android.graphics.Color
import android.os.Bundle
import android.text.TextUtils
import android.widget.TextView
import com.mediacloud.app.model.activity.BaseBackActivity
import com.mediacloud.app.newsmodule.R

/**
 * 爆料协议页面
 */
class TipExplainActivity : BaseBackActivity() {
    var tvBlAgreement: TextView? = null
    override fun getLayoutResID(): Int {
        return R.layout.activity_tip_explain
    }
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mTitileBar = findViewById(R.id.mTitileBar)
        loadingView = findViewById(R.id.mLoadingView)
        mTitileBar.setBackgroundColor(Color.WHITE)

        initStateView()
        setTitle("爆料协议")
        try {
            val stringExtra = intent.getStringExtra("blAgreement")
            tvBlAgreement = findViewById(R.id.tvBlAgreement)
            if(TextUtils.isEmpty(stringExtra)){
                showStateView(TYPE_NO_CONTENT, false)
            }else{
                tvBlAgreement?.text = stringExtra
            }
        } catch (e: Exception) {
        }
    }
}